<?php
header('Content-type: application/json;charset=utf-8');
require_once(dirname(__FILE__) . '/../include/config.inc.php');
require_once "function.php";
//获取 post的json数据
//获取 goodsid
$id = isset($_POST['id']) ? intval($_POST['id']) : 0;
$op = htmlspecialchars($_POST['op']);

if (isset($id)) {
    $time = time();
    //获取工单的时间
    $k = $dosql->GetOne("select * from `#@__user` where id='$id'");

    //获取工程师的 列表
    if ($op == 'getUser') {
        $jssdk->return_json_body(['code' => 0, 'msg' => 'success', 'data' => $k]);

    }


    //接单
    if ($op == 'update') {
        //修改订单状态
        $dosql->ExecNoneQuery("update  `#@__user` set qiang='$qiang',ispm='$ispm' where id='$id' ");
        //记录工单操作

        $jssdk->return_json_body(['code' => 0, 'msg' => '接单成功']);
    } else {
        $jssdk->return_json_body(['code' => 1, 'msg' => '状态错误，请重试']);
    }


}


?>